<template>
	<view class="container">
		<view class="search">
			<liu-search-bar :mode="2" @confirm="confirm" @blur="blur" @input="input" bgColor="#fff"
				searchColor="#1D6FFF" height="56rpx"></liu-search-bar>
		</view>
		<view class="top">
			<uni-row class="demo-uni-row" :width="nvueWidth">
				<uni-col :span="18">
					<view class="demo-uni-col dark">共3条</view>
				</uni-col>
				<uni-col :span="6">
					<view class="demo-uni-col light"><uni-combox :border="false" :candidates="candidates"
							v-model="value" @change="change" /></view>
				</uni-col>
			</uni-row>
		</view>
		<view class="cards" v-for="item in 3" :key="item.id">
			<view class="card">
				<view class="number">订单号：2021010831213</view>
				<view class="money">2000.00元</view>
			</view>
			<view class="info">
				<view class="user">
					<view class="name">下单用户：张三</view>
					<image src="@/static/电话.png"></image>
				</view>
				<view class="time">预约时间：2022-10-10 11 :00</view>
				<view class="service">服务项目：宝马X5加装轮毂、清洁车辆、汽车美容</view>
			</view>
			<view class="bottom">
				<view class="orderTime">下单时间：2022-10-10 11 :09</view>
				<navigator url="/pages/index/orders/particulars/particulars" hover-class="no-shadow" >
					<button class="button"><text class="button-text">查看详情</text></button>
					<yfx-tooltip ref="tooltip"></yfx-tooltip>
				</navigator>
			</view>
		</view>

	</view>
</template>

<script>
	export default {
		data() {
			return {
				value: '待服务',
				candidates: ['待服务', '已完成'],
				nvueWidth: 730,
			}
		},
		methods: {
			change(e) {
				console.log("e:", e);
			},
			//点击搜索或者确定
			confirm(e) {
				console.log('confirm搜索内容：' + e)
			},
			//blur事件
			blur(e) {
				console.log('blur搜索内容：' + e)
			},
			//inut事件
			input(e) {
				console.log('input搜索内容：' + e)
			}
		}
	}
</script>

<style>
	page {
		background-color: #fff;
	}

	.search {
		width: 710rpx;
		height: 66rpx;
		padding: 20rpx;
		background-color: rgba(239, 239, 245, 1);
	}

	.top {
		margin: 20rpx;
	}

	.cards {
		width: 720rpx;
		height: 420rpx;
		margin-left: 7rpx;
		border-radius: 20rpx;
		border-left: 10rpx solid rgba(85, 122, 214, 1);
	}

	.card {
		width: 680rpx;
		display: flex;
		margin: 20rpx;
		border-bottom: 1rpx solid rgba(238, 241, 246, 1);

	}

	.number {
		width: 440rpx;
		height: 60rpx;
		margin-top: 20rpx;
		line-height: 60rpx;
		font-size: 32rpx;
		font-weight: bold;
		margin-bottom: 20rpx;
		color: rgb(16, 16, 16);
	}

	.money {
		width: 190rpx;
		height: 60rpx;
		line-height: 60rpx;
		margin-left: 60rpx;
		margin-top: 20rpx;
		text-align: center;
		color: rgba(240, 89, 90, 1);
		font-weight: bold;
		font-size: 28rpx;
	}

	.info {
		width: 680rpx;
		height: 180rpx;
		margin: 20rpx;
		padding-bottom: 10rpx;
		border-bottom: 1rpx solid rgba(238, 241, 246, 1);
	}

	.user {
		display: flex;
		font-size: 28rpx;
		color: rgb(16, 16, 16);
		width: 350rpx;
		height: 45rpx;
	}

	.name {
		width: 270rpx;
		height: 45rpx;
	}

	.info image {
		display: flex;
		width: 40rpx;
		height: 40rpx;
		margin-left: 70rpx;
		vertical-align: middle;
	}

	.time {
		font-size: 28rpx;
		color: rgb(16, 16, 16);
		width: 450rpx;
		height: 45rpx;
		margin-top: 15rpx;
	}

	.service {
		font-size: 28rpx;
		color: rgb(16, 16, 16);
		width: 640rpx;
		height: 45rpx;
		margin-top: 15rpx;
		display: -webkit-box;
		-webkit-box-orient: vertical;
		-webkit-line-clamp: 1;
		overflow: hidden;

	}

	.bottom {
		display: flex;
		width: 680rpx;
		height: 80rpx;
		margin-left: 20rpx;
	}

	.orderTime {
		width: 450rpx;
		height: 60rpx;
		line-height: 60rpx;
		color: rgba(154, 154, 154, 1);
	}

	.button {
		width: 180rpx;
		height: 60rpx;
		border-radius: 22rpx;
		margin-left: 60rpx;
		line-height: 60rpx;
		text-align: center;
		background-color: rgba(85, 122, 214, 1);
		color: rgba(255, 255, 255, 1);
	}

	.button-text {
		font-size: 28rpx;
		color: rgba(255, 255, 255, 1);
	}

	.demo-uni-row {
		margin-bottom: 20rpx;

		// 组件在小程序端display为inline
		// QQ、抖音小程序文档写有 :host，但实测不生效
		// 百度小程序没有 :host
		/* #ifdef MP-TOUTIAO || MP-QQ || MP-BAIDU */
		display: block;
		/* #endif */
	}

	// 支付宝小程序没有 demo-uni-row 层级
	// 微信小程序使用了虚拟化节点，没有 demo-uni-row 层级
	/* #ifdef MP-ALIPAY || MP-WEIXIN */
	::v-deep .uni-row {
		margin-bottom: 20rpx;
	}

	/* #endif */

	.demo-uni-col {
		height: 72rpx;
		border-radius: 10rpx;
	}

	.dark_deep {

		background-color: #99a9bf;
	}

	.dark {
		font-size: 30rpx;
		line-height: 72rpx;
	}
</style>